using UnityEngine;

[CreateAssetMenu(fileName = "New AggressiveWeaponData", menuName = "Inventory/Data/Weapon/AggressiveWeapon Data")]
public class SO_AggressiveWeaponData : SO_WeaponData
{
    [SerializeField] private WeaponAttackDetails[] _attackDetails;

    public WeaponAttackDetails[] AttackDetails
    {
        get => _attackDetails;
        private set => _attackDetails = value;
    }

    private void OnEnable()
    {
        _amountOfAttack = AttackDetails.Length;

        _moventSpeed = new float[_amountOfAttack];

        for (var i = 0; i < _amountOfAttack; i++) _moventSpeed[i] = AttackDetails[i]._movementSpeed;
    }
}